package com.dl.test.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;

/**
 * @author DL
 * @create 2025-03-25 11:28
 */
@Configuration
public class SchedulerConfig {

    @Bean
    public Scheduler customScheduler() {
        // 限制为 1 个线程
        return Schedulers.newParallel("custom-scheduler", 1);
    }
}
